import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  /*{
    path: '/Login', //登录
    name: 'Login',
    component:Login
  },*/
  {
    path: '/', //主页
    name: 'Manage',
    component: () => import('../views/Manage'),
    redirect: "/pandect",
    children: [
      { path: 'pandect', name: 'Pandect', meta: {title: '总览'}, component: () => import('../views/pandect') },
      { path: 'system', name: 'System', meta: {title: '设置 / 系统日志'}, component: () => import('../views/System') },
      { path: 'ledger', name: 'ledger', meta: {title: '备件管理 / 备件台账 / 备件台账'}, component: () => import('../views/spare/spareLedger') },
      { path: 'spareAdd', name: 'spareAdd', meta: {title: '备件管理 / 备件台账 / 备件台账 / 新增备件'}, component: () => import('../views/spare/spareAdd') },
      { path: 'wareHousing', name: 'wareHousing', meta: {title: '备件管理 / 库存管理 / 入库管理'}, component: () => import('../views/spare/wareHousing') },
      { path: 'collectingWare', name: 'collectingWare', meta: {title: '备件管理 / 库存管理 / 入库管理 / 新增入库记录'}, component: () => import('../views/spare/collectingWare') },
      { path: 'outWareHousing', name: 'outWareHousing', meta: {title: '备件管理 / 库存管理 / 出库管理'}, component: () => import('../views/spare/outWareHousing') },
      { path: 'outWareAdd', name: 'outWareAdd', meta: {title: '备件管理 / 库存管理 / 出库管理 / 新增出库记录'}, component: () => import('../views/spare/outWareAdd') },
      { path: 'sparePartTypes', name: 'sparePartTypes', meta: {title: '备件管理 / 备件台账 / 备件类型'}, component: () => import('../views/spare/sparePartTypes') },
      { path: 'spareRequisition', name: 'spareRequisition', meta: {title: '备件管理 / 备件采购 / 备件采购'}, component: () => import('../views/spare/spareRequisition') },
      { path: 'spareProcureAdd', name: 'spareProcureAdd', meta: {title: '备件管理 / 备件采购 / 备件采购 / 新增备件采购记录'}, component: () => import('../views/spare/spareProcureAdd') },
      { path: 'spareUse', name: 'spareUse', meta: {title: '备件管理 / 备件采购 / 库存管理 / 备件领用'}, component: () => import('../views/spare/spareUse') },
      { path: 'spareUseAdd', name: 'spareUseAdd', meta: {title: '备件管理 / 备件采购 / 库存管理 / 备件领用 / 新增备件领用'}, component: () => import('../views/spare/spareUseAdd') },
      {path: 'EquipmentArchives',name:'EquipmentArchives',meta: {title: '/设备管理/设备档案'},component:()=>import("@/views/EquipmentArchives.vue")},
      {path: 'placeforstorage',name: 'PlaceForStorage',meta: {title: "设备管理/存放位置"},component:()=>import('@/views/PlaceForStorage.vue')},
      {path: 'devicetype',name: "DeviceType",meta: {title: "设备管理/设备类型"},component:()=>import('@/views/Devicetype.vue')},
      {path: 'MaintenanceProgram',name:'MaintenanceProgram',meta: {title: '保养管理/保养项目'},component:()=>import('@/views/MaintenanceProgram.vue')},
      {path: 'MaintenanceLevel',name:'MaintenanceLevel',meta: {title: '保养管理/保养级别'},component:()=>import('@/views/MaintenanceLevel.vue')},
      {path: 'AddEquipmentArchives',name:'AddEquipmentArchives',meta: {title: '设备管理/设备档案/新增档案'},component:()=>import('@/views/AddEquipmentArchives.vue')},
      {path: 'MaintenanceExperiencel',name:'MaintenanceExperiencel',meta: {title: '保养管理/保养经验'},component:()=>import('@/views/MaintenanceExperiencel.vue')},
      {path: 'AddMaintenanceExperiencel',name:'AddMaintenanceExperiencel',meta: {title: '保养管理/保养经验/新增保养经验'},component:()=>import('@/views/AddMaintenanceExperiencel.vue')},
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
